package cn.vconinfo.base.enums;

/**
 *  两个数字比较计算的结果比较符号
 * 
 * @author wb-lww450235
 * @version $Id: MathCompareCalMarkEnum.java, v 0.1 2018年11月22日 下午5:05:41 wb-lww450235 Exp $
 */
public enum MathCompareCalMarkEnum {

    GREATER(">", ""),
    GREATEREQUAL(">=", ""),
    LESS("<", ""),
    LESSEQUAL("<=", ""),
    EQUAL("=", ""),
    NOTEQUAL("!= ", "");

    private String code;

    private String message;

    private MathCompareCalMarkEnum(String code, String message) {
        this.code = code;
        this.message = message;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public static MathCompareCalMarkEnum getByValue(String code) {
        if (code != null) {
            for (MathCompareCalMarkEnum enu : values()) {
                if (enu.code.equals(code)) {
                    return enu;
                }
            }
        }
        return null;
    }

}
